
import VueRouter from 'vue-router'


import Home from './components/tabbar/Home.vue'
import Member from './components/tabbar/Member.vue'
import Shopcar from './components/tabbar/Shopcar.vue'
import Search from './components/tabbar/Search.vue'
import Newslist from './components/news/Newslist.vue'
import Newsinfo from './components/news/Newsinfo.vue'
import Photolist from './components/photos/Photolist.vue'
import Photoinfo from './components/photos/Photoinfo.vue'
import Goodslist from './components/goods/Goodslist.vue'
import Goodsinfo from './components/goods/Goodsinfo.vue'
import GoodsDesc from './components/goods/Goodsdesc.vue'
import GoodsComment from './components/goods/Goodscomment.vue'


//创建路由对象
let router = new VueRouter({
    routes: [
        {path: '/',redirect: '/home'},
        {path: '/home',component: Home},
        {path: '/member',component: Member},
        {path: '/shopcar',component: Shopcar},
        {path: '/search',component: Search},
        {path: '/home/newslist',component: Newslist},
        {path: '/home/newsinfo/:id',component: Newsinfo},
        {path: '/home/photolist',component: Photolist},
        {path: '/home/photoinfo/:id',component: Photoinfo},
        {path: '/home/goodslist',component: Goodslist},
        {path: '/home/goodsinfo/:id',component: Goodsinfo, name: 'goodsinfo'},
        {path: '/home/goodsdesc/:id',component: GoodsDesc, name: 'goodsdesc'},
        {path: '/home/goodscomment/:id',component: GoodsComment, name: 'goodscomment'}
    ],

    // 覆盖默认的路由高亮的类，默认的类叫做 router-link-active
    linkActiveClass: 'mui-active'
})

export default router
